Optimal. Leaf size=197 \[ \frac {16 a^2 (2 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^2 (5 A+7 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {4 a^2 (5 A+7 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 a^2 (19 A+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8 A \cos ^{\frac {3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.257, Rules used = {4199, 3125,
3055, 3047, 3102, 2827, 2719, 2715, 2720} \begin {gather*} \frac {4 a^2 (5 A+7 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {16 a^2 (2 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 a^2 (19 A+21 C) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{105 d}+\frac {4 a^2 (5 A+7 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{21 d}+\frac {8 A \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x) \left (a^2 \cos (c+d x)+a^2\right )}{63 d}+\frac {2 A \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x) (a \cos (c+d x)+a)^2}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2715
Rule 2719
Rule 2720
Rule 2827
Rule 3047
Rule 3055
Rule 3102
Rule 3125
Rule 4199
Rubi steps
\begin {align*} \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\int \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^2 \left (C+A \cos ^2(c+d x)\right ) \, dx\\ &=\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {2 \int \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^2 \left (\frac {3}{2} a (A+3 C)+2 a A \cos (c+d x)\right ) \, dx}{9 a}\\ &=\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8 A \cos ^{\frac {3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d}+\frac {4 \int \sqrt {\cos (c+d x)} (a+a \cos (c+d x)) \left (\frac {3}{4} a^2 (11 A+21 C)+\frac {3}{4} a^2 (19 A+21 C) \cos (c+d x)\right ) \, dx}{63 a}\\ &=\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8 A \cos ^{\frac {3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d}+\frac {4 \int \sqrt {\cos (c+d x)} \left (\frac {3}{4} a^3 (11 A+21 C)+\left (\frac {3}{4} a^3 (11 A+21 C)+\frac {3}{4} a^3 (19 A+21 C)\right ) \cos (c+d x)+\frac {3}{4} a^3 (19 A+21 C) \cos ^2(c+d x)\right ) \, dx}{63 a}\\ &=\frac {2 a^2 (19 A+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8 A \cos ^{\frac {3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d}+\frac {8 \int \sqrt {\cos (c+d x)} \left (21 a^3 (2 A+3 C)+\frac {45}{4} a^3 (5 A+7 C) \cos (c+d x)\right ) \, dx}{315 a}\\ &=\frac {2 a^2 (19 A+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8 A \cos ^{\frac {3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d}+\frac {1}{15} \left (8 a^2 (2 A+3 C)\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{7} \left (2 a^2 (5 A+7 C)\right ) \int \cos ^{\frac {3}{2}}(c+d x) \, dx\\ &=\frac {16 a^2 (2 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^2 (5 A+7 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 a^2 (19 A+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8 A \cos ^{\frac {3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d}+\frac {1}{21} \left (2 a^2 (5 A+7 C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {16 a^2 (2 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^2 (5 A+7 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {4 a^2 (5 A+7 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 a^2 (19 A+21 C) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{105 d}+\frac {2 A \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8 A \cos ^{\frac {3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{63 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 6.35, size = 1118, normalized size = 5.68 \begin {gather*} \frac {\cos ^{\frac {9}{2}}(c+d x) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {8 (2 A+3 C) \cot (c)}{15 d}+\frac {(23 A+28 C) \cos (d x) \sin (c)}{42 d}+\frac {(37 A+18 C) \cos (2 d x) \sin (2 c)}{180 d}+\frac {A \cos (3 d x) \sin (3 c)}{14 d}+\frac {A \cos (4 d x) \sin (4 c)}{72 d}+\frac {(23 A+28 C) \cos (c) \sin (d x)}{42 d}+\frac {(37 A+18 C) \cos (2 c) \sin (2 d x)}{180 d}+\frac {A \cos (3 c) \sin (3 d x)}{14 d}+\frac {A \cos (4 c) \sin (4 d x)}{72 d}\right )}{A+2 C+A \cos (2 c+2 d x)}-\frac {10 A \cos ^4(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{21 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}-\frac {2 C \cos ^4(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{3 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}-\frac {8 A \cos ^4(c+d x) \csc (c) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\text {ArcTan}(\tan (c)))\right ) \sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {1+\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{15 d (A+2 C+A \cos (2 c+2 d x))}-\frac {4 C \cos ^4(c+d x) \csc (c) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\text {ArcTan}(\tan (c)))\right ) \sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {1+\cos (d x+\text {ArcTan}(\tan (c)))} \sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\text {ArcTan}(\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\text {ArcTan}(\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{5 d (A+2 C+A \cos (2 c+2 d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 408, normalized size = 2.07
method | result | size |
default | \(-\frac {4 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, a^{2} \left (-560 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1840 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-2368 A -252 C \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (1568 A +672 C \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-387 A -273 C \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+75 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-168 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+105 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-252 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{315 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(408\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.09, size = 219, normalized size = 1.11 \begin {gather*} -\frac {2 \, {\left (15 i \, \sqrt {2} {\left (5 \, A + 7 \, C\right )} a^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 i \, \sqrt {2} {\left (5 \, A + 7 \, C\right )} a^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 84 i \, \sqrt {2} {\left (2 \, A + 3 \, C\right )} a^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 84 i \, \sqrt {2} {\left (2 \, A + 3 \, C\right )} a^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - {\left (35 \, A a^{2} \cos \left (d x + c\right )^{3} + 90 \, A a^{2} \cos \left (d x + c\right )^{2} + 7 \, {\left (16 \, A + 9 \, C\right )} a^{2} \cos \left (d x + c\right ) + 30 \, {\left (5 \, A + 7 \, C\right )} a^{2}\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )\right )}}{315 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.47, size = 242, normalized size = 1.23 \begin {gather*} \frac {2\,C\,a^2\,\left (\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3}+\frac {2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3}\right )}{d}+\frac {2\,C\,a^2\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}-\frac {2\,A\,a^2\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {4\,A\,a^2\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,A\,a^2\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,C\,a^2\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________